import request from "./request"
import upload from "./upload"
 
//获取手机号
export const getPhone=(code)=>request({
   url:'/api/user/getphone',
   data:{code},
   method:'POST'
})
//获取用户信息
export const getuser=()=>request({
  url:'/api/user/getinfo',
})
//登录
export const ulogin=(code)=>request({
  url:'/api/user/ulogin',
  data:{code},
  method:'POST'
})
//上传文件
export const upfile=(files)=>upload({
  files
})
//新建
export const postgroup=(pdata)=>request({ 
  url:'/api/user/postgroup',
  data:pdata,
  method:'POST'
})
//获取列表
export const getglist=()=>request({
  url:'/api/user/getglist'
})
export const getgdetail=(gid)=>request({
  url:'/api/user/getgdetail',
  data:{gid},
})
export const editgroup=(pdata)=>request({ 
  url:'/api/user/editgroup',
  data:pdata,
  method:'POST'
})
export const getulist=(gid)=>request({ 
  url:'/api/user/getulist',
  data:{gid},
})
export const getguser=(data)=>request({ 
  url:'/api/user/getguser',
  data:data,
})
export const outgroup=(gid)=>request({ 
  url:'/api/user/outgroup',
  data:{gid},
})
export const ingroup=(gid)=>request({ 
  url:'/api/user/ingroup',
  data:{gid},
})
export const delguser=(data)=>request({ 
  url:'/api/user/delguser',
  data:data,
})

export const setguan=(data)=>request({ 
  url:'/api/user/setguan',
  data:data,
})
export const getgname=(gid)=>request({
  url:'/api/user/getgname',
  data:{gid},
})
export const setgname=(pdata)=>request({
  url:'/api/user/setgname',
  data:pdata,
  method:'POST'
})

export const getjing=(gid)=>request({
  url:'/api/user/getjing',
  data:{gid},
})
export const baoshu=(pdata)=>request({
  url:'/api/user/baoshu',
  data:pdata,
  method:'POST'
})
export const getlogs=(pdata)=>request({
  url:'/api/user/getlogs',
  data:pdata,
})

export const mygroup=()=>request({
  url:'/api/user/mygroup'
})
export const getinfo=()=>request({
  url:'/api/user/getinfo'
})

export const setuname=(pdata)=>request({
  url:'/api/user/setuname',
  data:pdata,
  method:'POST'
})

export const paihang=(pdata)=>request({
  url:'/api/user/paihang',
  data:pdata,
})
export const getulog=(pdata)=>request({
  url:'/api/user/getulog',
  data:pdata,
})
export const setulog=(pdata)=>request({
  url:'/api/user/setulog',
  data:pdata,
  method:'POST'
})
